package com.rcd.manager.dao.impl;

import java.util.List;

import com.rcd.dao.IProductDao;
import com.rcd.exception.MyException;
import com.rcd.manager.dao.IProductManagerDao;
import com.rcd.util.Page;
import com.rcd.vo.Product;

public class IProductManagerDaoimpl implements IProductManagerDao {

	private IProductDao productDao;
	
	public void addProduct(Product product) throws MyException {
		productDao.addProduct(product);
	}
	
	public void delProduct(int pid) throws MyException {
		productDao.delProduct(pid);
	}

	public List<Product> findAll(Page page) throws MyException {
		return productDao.findAll(page);
	}

	public Product findByPid(int pid) throws MyException {
		return productDao.findByPid(pid);
	}

	public int getAllSize(Page page) throws MyException {
		return productDao.getAllSize(page);
	}

	public void updateProduct(Product product) throws MyException {
		productDao.updateProduct(product);
	}

	public void setProductDao(IProductDao productDao) {
		this.productDao = productDao;
	}

	public void delProducts(Object[] pids) throws MyException {
		productDao.delProducts(pids);
	}
}
